﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NbMeterServices.Entity
{
    /// <summary>
    /// 仪表控制任务
    /// </summary>
    [SugarTable("MR_MeterCtrlTask", "仪表控制任务")]
    public class MrMeterCtrlTask 
    {
        /// <summary>
        /// 雪花Id
        /// </summary>
        [SugarColumn(ColumnName = "Id", ColumnDescription = "主键Id", IsPrimaryKey = true, IsIdentity = true)]
        public long Id { get; set; }
        /// <summary>
        /// 仪表Id
        /// </summary>
        [SugarColumn(ColumnName = "MeterId", ColumnDescription = "仪表Id")]
        public long? MeterId { get; set; }

        /// <summary>
        /// 仪表编号
        /// </summary>
        [SugarColumn(ColumnName = "MeterNo", ColumnDescription = "仪表编号", Length = 32)]
        public string? MeterNo { get; set; }

        /// <summary>
        /// 状态信息
        /// </summary>
        [SugarColumn(ColumnName = "Status", ColumnDescription = "状态信息", Length = 32)]
        public string? Status { get; set; }

        /// <summary>
        /// 执行时间
        /// </summary>
        [SugarColumn(ColumnName = "ExecuteTime", ColumnDescription = "执行时间")]
        public DateTime? ExecuteTime { get; set; }

        /// <summary>
        /// 执行时间
        /// </summary>
        [SugarColumn(ColumnName = "ReplyTime", ColumnDescription = "反馈时间")]
        public DateTime? ReplyTime { get; set; }

        /// <summary>
        /// 命令信息
        /// </summary>
        [Required]
        [SugarColumn(ColumnName = "Command", ColumnDescription = "命令信息", Length = 200)]
        public string Command { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true)]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 软删除
        /// </summary>
        [SugarColumn(ColumnDescription = "软删除")]
        public bool IsDelete { get; set; } = false;
    }
}
